<div class="panel panel-default">
	<div class="panel-heading">{{('crm.myorder.queryParameter' | translate) || '查询参数'}} </div>
	<div class="panel-body">
		<form class="form-horizontal">
			<div class="form-group">
				<label for="custName" class="col-lg-2 control-label">
					{{('crm.myorder.custName' | translate) || '客户名称：'}}
				</label>
				<div class="col-lg-3">
					<input name="customer.custName" type="text" [(ngModel)]="customer.custName" class="form-control" placeholder="请输入客户名称">
				</div>
				<label for="orderState" class="col-lg-2 control-label">
					{{('crm.myorder.orderState' | translate) || '施工状态：'}}
				</label>
				<div class="col-lg-3">
					<ng-select name="customer.orderState" [(ngModel)]="customer.orderState" #orderStateSelect placeholder="--所有状态--"> </ng-select>
				</div>		
			
            	<div class="col-lg-2">
            		<button class="mb-sm btn btn-primary btn-outline" type="button" (click)="submitQuery()">
						{{('crm.myorder.check' | translate) || '查 询'}}
					</button>
            	</div>	
            </div>	
		</form>
	</div>
</div>
<div class="panel panel-default">
    <div class="panel-body">		
		<p-dataTable #md [value]="myorder" [rows]="pageSize" [paginator]="true" [pageLinks]="3" reorderableColumns="true" 
		[lazy]="true" [totalRecords]="totalRecords" (onLazyLoad)="loadLazy($event)" [responsive]="true">
		    <p-column field="orderId" header="{{('crm.myorder.orderId' | translate) || '订单号'}}" [style]="{'text-align':'center'}">
		    	<ng-template let-col let-myorder="rowData" pTemplate="body">
		            <span style="word-break:break-all;">{{myorder[col.field]}}</span>
		        </ng-template>
		    </p-column>
		    <p-column field="custName" header="{{('crm.myorder.custName1' | translate) || '客户名称'}}" [style]="{'text-align':'center'}"></p-column>
		    <p-column field="prodName" header="{{('crm.myorder.prodName' | translate) || '产品'}}" [style]="{'text-align':'center'}"></p-column>
		    <p-column field="fee" header="{{('crm.myorder.fee' | translate) || '费用'}}" [style]="{'text-align':'center'}">
				<ng-template let-col let-settle="rowData" pTemplate="body">
		            <span style="word-break:break-all;">{{('crm.myorder.yuan' | translate) || '¥'}}{{settle[col.field] |number:'1.2-2'}}</span>
		        </ng-template>
			</p-column>
		    <p-column field="orderState" header="{{('crm.myorder.orderState1' | translate) || '项目状态'}}" [style]="{'text-align':'center'}">
	    		<ng-template let-col let-myorder="rowData" pTemplate="body">
					<span *ngIf="myorder[col.field] == '2'" style="color:#1AACDA">{{('crm.myorder.status.unsuccess' | translate) || '施工中'}}</span>
					<span *ngIf="myorder[col.field] == '3'" style="color:#24B145">{{('crm.myorder.status.success' | translate) || '施工完成'}}</span>
	    	    </ng-template>
		    </p-column>
		    <p-column field="createDate" header="{{('crm.myorder.createDate' | translate) || '有效日期'}}" [style]="{'text-align':'center'}"></p-column>
			<p-column header="订单详情" styleClass="col-button"> 
				<ng-template let-r="rowData" pTemplate="body">
					<button type="button" pButton (click)="lookupOrderInfos(r)" icon="fa-search"></button>
				</ng-template>
			</p-column>
		</p-dataTable>
	</div>
</div>
<div class="modal fade" bsModal #nodeModal="bs-modal" [config]="{backdrop: false}" tabindex="-1" role="dialog"
	aria-labelledby="mySmallModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-body">
				<ncloud-node #ncloudnode *ngIf="nodeInfos.length > 0" [(ngModel)]="nodeInfos"></ncloud-node>
			</div>
		</div>
	</div>
</div>